package ru.papergames.common.beans;

import ru.papergames.common.form.PcPlayerForm;

/**
 * @author Alexander Troshanin
 */
public class PcPlayerInFightersPool extends AbstractPlayerInFightersPool implements Comparable<PcPlayerInFightersPool>{

    private final PcPlayerForm player;

    private long createTime;

    public PcPlayerInFightersPool(PcPlayerForm player) {
        this.player = player;
        this.createTime = System.currentTimeMillis();
    }

    public PcPlayerForm getPlayer() {
        return player;
    }

    public long getCreateTime() {
        return createTime;
    }

    public int compareTo(PcPlayerInFightersPool that) {
        return (this.createTime < that.createTime ? -1 : (this.createTime == that.createTime ? 0 : 1));
    }
}
